<template>
  <div class="nav">
    <div class="logo">
      <img src="@/assets/logo.png" alt="" />
      <h1>行者运车</h1>
    </div>
    <div class="nav-item">
      <el-input
      v-model="searchData"
      style="width: 240px"
      placeholder="请输入"
      >
        <template #append>
        <el-button>
          <el-icon><Search /></el-icon>
        </el-button>
        </template>
      </el-input>
      <el-avatar  class="avatar"
        src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png"
      />
    </div>
  </div>
</template>

<script setup>
import { ref } from 'vue'

 const searchData = ref()
</script>

<style lang="scss">
.nav{
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  // background: white;
  .logo{
    display: flex;
    align-items: center;
    height: 50px;
    img{
      height: 30px;
      width: 30px;
      margin-right: 8px;
    }
    h1{
      font-size: 24px;
      font-weight: bold;
    }
  }
  .nav-item{
    align-items: center;
    .avatar{
      vertical-align: middle;
      margin-left:8px ;
    }
  }
}
</style>